#######################
# This creates Table 4, tabular results of question wording experiment 1
#######################

#find n for each condition
t4n<-svytable(~p_over,nd)

#create vector with total n, conditional n
#add as column to existing results
fig6$n<-c(t4n[1],t4n[2],sum(t4n))
fig6$n<-signif(fig6$n,4)

#format table
T4<-fig6

#convert mean, se, and ci to percent
T4$tf<-100*T4$tf
T4$se<-100*T4$se
T4$ci_lo<-100*T4$ci_lo
T4$ci_hi<-100*T4$ci_hi

#add descriptive values for conditions
T4$p_over<-c("Even if People are Hurt and Killed","No Consequences","All Respondents")

#add column names
colnames(T4)<-c("Question Wording","Mean Agree or Strongly Agree (%)","Standard Error (%)","95% CI Low","95% CI High","Observations")

write.csv(T4,"../Main Results/T4.csv")


